package com.example.demo.pattern.observer;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @program: demo
 * @description: 事件监听
 * @author: yby
 * @create: 2020-06-22 17:52
 **/
@Component
public class MyListener implements ApplicationListener<MyEvent> {

    @Override
    public void onApplicationEvent(MyEvent myEvent) {
        System.out.println("监听事件。。。");
    }
}
